<?php
header ( 'content-type:text/html; charset=utf-8' );

@$login = $_REQUEST ['login'];

@$password = $_REQUEST ['password'];

@$newpassword = $_REQUEST ['newpassword'];

if (empty ( $login ) || empty ( $password ) || empty($newpassword)) {
	die(json_encode(array('status'=>false,'info'=>'tips：请输入完整的注册信息')));
}

if ($password!=$newpassword){
	die(json_encode(array('status'=>false,'info'=>'tips：两次输入的密码不一致')));
}

require 'lib/db.php';

@$user = dbinsert('insert into user(login,password) value(:login,:password)',array('login'=>$login,'password'=>$password));

echo json_encode(array('status'=>true));